package com.andy.blog.admin.service.impl;

import com.andy.blog.admin.service.SysRoleMenuBusService;
import com.andy.blog.common.utils.TransformUtils;
import com.andy.blog.dal.domain.SysRoleMenuDO;
import com.andy.blog.dal.service.SysRoleMenuDalService;
import com.andy.blog.dal.vo.SysRoleMenuVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by andy on 2023/9/16 15:26
 */
@Service
public class SysRoleMenuBusServiceImpl implements SysRoleMenuBusService {

    @Resource
    private SysRoleMenuDalService sysRoleMenuDalService;


    @Override
    public void insertRoleMenu(List<SysRoleMenuVO> sysRoleMenuList) {

        List<SysRoleMenuDO> roleMenuDOS = TransformUtils.transformList(sysRoleMenuList, SysRoleMenuDO.class);
        sysRoleMenuDalService.batchRoleMenu(roleMenuDOS);
    }
}
